package fanxing;

import java.util.Random;




public interface Generator <T>{

	public T next();
}

class FruitGenerator implements Generator<String>
{
	private String[] fruits={"Apple","Banana","Pear"};

	@Override
	public String next() {
		Random r=new Random();	
		return fruits[r.nextInt(3)];
	}
	
}
